package cn.fang2chen.java.distributed.lock.framework;

import lombok.Data;

/**
 * 远程锁的参数
 * 也是 {@link RemoteLockSynchronizer 的入口参数}
 *
 * @author dcmini chen
 * @since 1.0.0
 */
@Data
public class RemoteLockParam {

    public RemoteLockParam() {
    }

    public RemoteLockParam(final String lockPath, final String operatorId, final long expiredTimeMilli) {
        this.lockPath = lockPath;
        this.operatorId = operatorId;
        this.expiredTimeMilli = expiredTimeMilli;
    }

    /**
     * 所资源的路径
     */
    private String lockPath;

    /**
     * 操作者的标识
     */
    private String operatorId;

    /**
     * 有效时长
     */
    private long expiredTimeMilli;

}
